package com.ruoyi.edh.service.impl;

import java.util.List;
import java.util.Map;

import com.ruoyi.edh.domain.EdhRecommendation;
import com.ruoyi.edh.domain.vo.EdhRecommendationVo;
import com.ruoyi.edh.mapper.EdhRecommendationMapper;
import com.ruoyi.edh.service.IEdhRecommendationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 易订货-首页轮播图Service业务层处理
 * 
 * @author xxx
 * @date 2020-09-02
 */
@Service
public class EdhRecommendationServiceImpl implements IEdhRecommendationService
{
    @Autowired
    private EdhRecommendationMapper edhRecommendationMapper;

    /**
     * 查询易订货-首页轮播图
     * 
     * @param id 易订货-首页轮播图ID
     * @return 易订货-首页轮播图
     */
    @Override
    public EdhRecommendation selectEdhRecommendationById(Long id)
    {
        return edhRecommendationMapper.selectEdhRecommendationById(id);
    }

    /**
     * 查询首页轮播图
     * @return
     */
    @Override
    public List<Map<String,Object>> selectHomeRecommendation() {
        return edhRecommendationMapper.selectHomeRecommendation();
    }

    /**
     * 查询易订货-首页轮播图列表
     * 
     * @param edhRecommendation 易订货-首页轮播图
     * @return 易订货-首页轮播图
     */
    @Override
    public List<EdhRecommendation> selectEdhRecommendationList(EdhRecommendation edhRecommendation)
    {
        return edhRecommendationMapper.selectEdhRecommendationList(edhRecommendation);
    }

    /**
     * 新增易订货-首页轮播图
     * 
     * @param edhRecommendation 易订货-首页轮播图
     * @return 结果
     */
    @Override
    public int insertEdhRecommendation(EdhRecommendation edhRecommendation)
    {
        return edhRecommendationMapper.insertEdhRecommendation(edhRecommendation);
    }

    /**
     * 修改易订货-首页轮播图
     * 
     * @param edhRecommendation 易订货-首页轮播图
     * @return 结果
     */
    @Override
    public int updateEdhRecommendation(EdhRecommendation edhRecommendation)
    {
        return edhRecommendationMapper.updateEdhRecommendation(edhRecommendation);
    }

    /**
     * 批量删除易订货-首页轮播图
     * 
     * @param ids 需要删除的易订货-首页轮播图ID
     * @return 结果
     */
    @Override
    public int deleteEdhRecommendationByIds(Long[] ids)
    {
        return edhRecommendationMapper.deleteEdhRecommendationByIds(ids);
    }

    /**
     * 删除易订货-首页轮播图信息
     * 
     * @param id 易订货-首页轮播图ID
     * @return 结果
     */
    @Override
    public int deleteEdhRecommendationById(Long id)
    {
        return edhRecommendationMapper.deleteEdhRecommendationById(id);
    }
}
